<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>支付</title>
<link href="<%=basePath%>skin/css/public.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath%>skin/css/payment.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=basePath%>skin/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/public.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/common.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		navi()
	}); 
    function aa(a, b, c) {
        document.form1.div.value = a ;
        document.getElementById("pay_content").getElementsByTagName("div")[a - 1].className = "pay_card_chose";
        document.getElementById("pay_content").getElementsByTagName("div")[b - 1].className = "pay_card";


		if (a == "1") {
			document.getElementById("radio_01").checked = "checked";
			}
			else if(a == "2"){
			document.getElementById("radio_02").checked = "checked";
			}
    }
    function Check(x) {
         document.all.div.value = x;
    }
</script>
</head>

<body>
	<div class="payment">
    	<div class="container">
        	<div class="header-wrap">
        		<c:import url="/layouts/top.jsp" />
                <c:import url="/layouts/head.jsp" />
                <div class="nav-warp">
					<div class="nav-main-warp wp">
						<div class="head-v3">
							<div class="navigation-up">
								<div class="navigation-inner">
									<div class="navigation-v3">
										<ul>
											<li class="fLeft navi_product first" _t_nav="product">
												<h2>
													<a href="<%=basePath%>shop/product/list.shtml">全部产品
														<img src="<%=basePath%>skin/images/all-product-arrow.png" />
													</a>
												</h2>
											</li>
											<li class="nav-up-selected-inpage fLeft" _t_nav="home">
												<h2>
													<a href="<%=basePath%>">美嘉商城</a>
												</h2>
											</li>
											<li class="fLeft self_community" _t_nav="community">
												<h2>
													<a href="javascript:void(0)">美嘉社区</a>
												</h2>
											</li>
											<li class="fLeft technology" _t_nav="technology">
												<h2>
													<a href="#">饲养技术</a>
												</h2>
											</li>
											<li class="fLeft server" _t_nav="server">
												<h2>
													<a href="">美嘉服务</a>
												</h2>
											</li>
											<li class="fLeft know" _t_nav="know">
												<h2>
													<a href="aboutMJ.html">了解美嘉</a>
												</h2>
											</li>
											<li class="fLeft navi_cart" _t_nav="cart">
												<h2>
													<a href="<%=basePath%>cart/list.shtml">
														<img src="<%=basePath%>skin/images/cart-icon.png" />购物车（<span id="cartnum">0</span>）
													</a>
												</h2>
											</li>
										</ul>
									</div>
								</div>
							</div>
							<div class="navigation-down">
								<div id="product" class="nav-down-menu menu-1"
									style="display: none;" _t_nav="product">
									<div class="navigation-down-inner">
										<c:forEach items="${productCategoryTree }" var="productCategory">
											<c:if test="${productCategory.grade == 0 }">
												<div class="navi-down-area">
													<a href="<%=basePath%>shop/product/list.shtml?productCategoryId=${productCategory.id }" class="product-cate">
														<img src="<%=basePath%>download.shtml?filepath=${productCategory.source}" />
													</a>
													<ul>
														<li><a href="<%=basePath%>shop/product/list.shtml?productCategoryId=${productCategory.id }">${productCategory.name}</a></li>
														<div class="clear"></div>
													</ul>
												</div>
											</c:if>
										</c:forEach>
									</div>
								</div>
								
								<div id="community" class="nav-down-menu menu-3" style="display: none;" _t_nav="community">
                                    <div class="navigation-down-inner">
                                    	<div class="navi-down-area-second">
                                        	<a href="<%=basePath%>forumTopic/list.shtml" class="product-cate"><img src="<%=basePath%>skin/images/mjbbs.png" /></a>
                                        </div>
                                        <div class="navi-down-area-second">
                                        	<a href="<%=basePath%>collegeTopic/list.shtml" class="product-cate"><img src="<%=basePath%>skin/images/mjschool.png" /></a>
                                        </div>
                                    </div>
                                </div>
							</div>
						</div>
					</div>
				</div>
            </div>
        	<div class="content">
                <div>
                    <div class="buy-content">
                        <div class="stepbar">
                            <h1 class="buy-logo">支付</h1>
                            <ol class="tb-stepbar">
                                <li class="step-5 stepbar-current steper-over stepbar-first"><span>查看购物车</span></li>
                                <li class="step-5 stepbar-current steper-over"><span>提交订单</span></li>
                                <li class="step-5 stepbar-current"><span>付款</span></li>
                                <li class="step-5 stepbar-last"><span>等待收货</span></li>
                            </ol>
                        </div>
                        <div class="area">
                            <h3>订单详情</h3> 
                            <div class="pay_order_info">
                                <!--box_start-->
                                <div class="pay_order_box pay_order_order_detail">
                                    <div class="pay_order_box_b">
                                        <div class="pay_order_content">
                                            <div class="pay_order_total">
                                                <p>订单金额:<b><fmt:formatNumber value="${order.amount}" pattern="0.00"/></b> 元</p>
                                                	订单号:${order.sn } <a href="<%=basePath%>member/order/view.shtml?id=${order.id}">查看订单</a>
                                                <i class="f63b3b">(请您在<fmt:formatDate value="${order.expire }" pattern="yyyy-MM-dd HH:mm:ss"/>之前支付订单款项，否则该订单将失效！)</i>
                                            </div>
                                            <ul class="pay_order_clearfix clearfix">
                                                <li class="pay_order_left">
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                            <th width="20%">收货人：</th>
                                                            <td>${order.consignee }</td>
                                                        </tr>
                                                        <tr>
                                                            <th>联系电话：</th>
                                                            <td>${order.phone }</td>
                                                        </tr>
                                                        <tr>
                                                            <th>收货地址：</th>
                                                            <td>${order.areaName }${order.address }</td>
                                                        </tr>
                                                    </table>
                                                </li>
                                                <li class="pay_order_right">
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                        	<th width="20%">配送方式：</th>
                                                        	<td>${order.shippingMethodName }</td>
                                                        </tr>
                                                        <tr>
                                                            <th>支付方式：</th>
                                                            <td>${order.paymentMethodName }</td>
                                                        </tr>
                                                    </table>
                                                </li>
                                            </ul>
                                        </div>
                                        <!-- 单张订单 End -->
                                    </div>
                                </div>
								<!--box_end-->
                            </div>
                        	<h3>选择支付方式</h3> 
                            <div id="pay_content">
                                <form name="form1">
                                <div class="pay_card" name=01 onclick=aa(1,2,3,4); Check(this.name,"")>
                                    <span class="pay_card_content">
                                        <input id="radio_01" name="radio" type="radio" value="1" />
                                        <img src="<%=basePath%>skin/images/abc.jpg"/>
                                    </span>
                                </div>
                                <input type=text name=div value="01" style="display:none;" >
                                </form>
                            </div>
                        </div>  
                    </div>
                    <div class="buy-footer">
                        <div class="order-go clearfix">
                            <div class="address-confirm clearfix">
                                <div class="submitOrder">
                                    <a class="btn-go " href="javascript:alert('敬请等待');">去支付</a>
                                </div>
                            </div>
                        </div>
                    </div>
				</div>
			</div>
        </div>
    </div>
</body>
</html>
